<template>
  <a-alert :type="color" style="margin-bottom: 16px;">
    <template #message>
      <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">
      {{selectedRowKeys.length}}</a>项&nbsp;&nbsp;
      <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      <slot name="setting" style="float: right"/>
    </template>
  </a-alert>
</template>
<script setup>
const props = defineProps({
  selectedRowKeys: {
    type: Array,
    default: () => []
  },
  color: {
    type: String,
    default: 'info'
  }
})
const emit = defineEmits(['onClearSelected'])
const onClearSelected = () => {
  emit('onClearSelected')
}
</script>

<style scoped>

</style>
